Triggered Schedule Launch

Configure conditional rendering of publications and running of alerts and subscriptions using triggers. You can create conditions that will determine whether or not the publication or alert schedule will run. These conditions are determined by one or more "triggers." Triggers are data-driven conditions that determine whether an event is launched.

Triggered Launch

These conditions are set from the Triggered Launch section of the publication and alerts schedulers, in the Create Condition dialog.

You can configure your own custom triggers or a model-refresh trigger that will render publications and run alerts and subscriptions when the underlying data model is reprocessed.

Configure a New Condition

  1. Select the Use Trigger checkbox to include triggers for the schedule.
  2. You can determine the launch of the scheduled item to be either when the conditions are met or not met, by selecting Trigger if True or Trigger if False.
  3. Click Create Condition to define the condition's formula. The Create Condition dialog opens.

Create Condition dialog

Trigger Condition

Create the trigger condition, populating in the fields along the top of the dialog (purple highlight above) by making selections from the other fields. This condition will trigger the launch when it is met (true) or not met (false). The fields (from right to left) are:

  • First Query Field: The first query field must contain a dynamic function. This will be populated automatically when you select your data using the Content drop-down and then click Set to save your changes.
  • Operator: This can be numeric: equals, greater than, less than, and so on; or textual: starts with, contains, does not contain, and so on.
  • Target type: The type of data that you are going to compare the first query to. Can be one of: Static Value (#), Dynamic Function (fx), or Last Updated Value (clock icon).
  • Second Query Field: Either a dynamic function or a static value, which can be either numeric or textual.

Content

Use the Content drop-down (orange arrow above) to select the data that you want to base your dynamic formula on. You can select a Matrix Grid from a discovery or a Visual Area from a tabulation. Once you have selected a source, the main panel is populated with its data (orange box).

Tip: If you want to use Multiple Source Grids, you can use Tabulate to blend queries from multiple data sources into a single tabulation and then define a Visual Area that contains all source data.

The Open Content button (purple arrow) opens the selected Matrix Grid in Discover or the tabulation that contains the selected visual area in Tabulate.

Constructing your Expression

Selecting Data

Select a Cell, Column, or Row in the table to add that cell to the formula window (blue arrow). In the preceding example, the selected cell is data(1,1) selecting the sales values for Bikes in Canada.

Functions

You can use the PQL functions in the Functions panel to create a PQL expression that adds markup to your value or that manipulates the result before it is used:

  • The PQL libraries that are available in this panel are Common and Dynamic.
  • You can search the functions by name using the Search field at the top of the Functions panel.
  • You can hover your cursor over the item in the Functions tree to show a description of the available function, including its syntax.
  • You can also double-click the functions in the tree to copy them into the Formula window. If you select content in the Formula panel and then double-click a function, anything that is selected is inserted within the parentheses.

Note: The Pyramid Query Language (PQL), pronounced "Prequel," is a language built into Pyramid's PYRANA engine to allow users to construct queries that can run against the many SQL data stacks that Pyramid can query natively. PQL includes a vast array of operations and functions that allow users to query data and build analytical logic.

Save and inject
  • Click Set (yellow arrow) to inject the formula into the first field.

Comparison

Once your expression is created for the first query, you need to create the comparison with a static value, a second query, or a last updated value:

  1. If you've selected compare to static value, type the value in the second field.
  2. If you've selected compare to dynamic function, select the second field and use Content (as described above) to build the required formula. Click here for a list of dynamic functions.
  3. If you've selected compare to last updated value, select the required grid from using Content and select the required cells. Note: This option compares the current value of the given cells with their previous value; that is, it compares the value this schedule with the value last schedule.

Save and Close

Once you have defined all of the details for your condition, you should:

  1. Click Set (green arrow).
  2. Click Test to check that the output from your condition is as you expect.
  3. Click Apply at the bottom of the dialog (yellow arrow).

The dialog closes, and the condition is added to the Triggered Launch window of the Schedule panel.

Multiple Conditions

You can add multiple conditions by clicking Query Condition again and repeating the process above.

  • You can create a relationship between the conditions by selecting the relevant checkbox and choosing either AND or OR.
  • To create a group of conditions, select the relevant conditions and click Group. To remove the group, click the orange group bar (ensuring the conditions are not selected).

Model-Refresh Condition

Use this option to trigger the conditional rendering of publications and running of alerts and subscriptions based on the reprocessing of the underlying data models.

  • Click here to learn about model-refresh conditions.

PQL Functions

The Pyramid Query Language (PQL), pronounced "Prequel," is a language built into Pyramid's PYRANA engine to allow users to construct queries that can run against the many SQL data stacks that Pyramid can query natively. PQL includes a vast array of operations and functions that allow users to query data and build analytical logic.

The Create Query Condition dialog exposes Dynamic and Common functions. Dynamic functions are a set of specialized methods that are designed to act on a given query's result set. Common functions are a set of methods that are found in most programmatic and mathematical function libraries. These functions are used to perform logic on basic data without concern for data structures, context, or even source.

To add a PQL function from the library to the script editor, simply double click on it. You will then need to inject values into the function.

Using the AI-Driven LLM PQL Function

Pyramid's Generative AI integration enables you to use AI to generate scripts and images, dynamic text and infographics, calculations and lists, schedules, colors, and more. It allows you to generate a range of content, including complex code, simply by providing a text prompt.

Tip: You can use the LLM PQL function (from the Common PQL functions) to generate dynamic text, adding the results to custom tooltips, text fields, or into your PQL formulas. While this function cannot tell you about your data set, it can add additional information and background to your presentation or publication.

Warning: When using LLMs, your assets are generated using public domain algorithms. This can produce erroneous and inconsistent or random results. Use at your own risk.